<div class="card-pack-item coupon-item">
	{% if cardDetail.targetType == "course" %}
		{% if cardDetail.targetId == 0 %}
			<p class="title">{{ 'coupon.for_any_course'|trans }}</p>
		{% else %}
			<p class="title">{{ 'coupon.for_specified_courses'|trans }}</p>
		{% endif %}
	{% endif %}
	{% if cardDetail.targetType == "classroom" %}
		{% if cardDetail.targetId == 0 %}
			<p class="title">{{ 'coupon.for_any_classroom'|trans }}</p>
		{% else %}
			<p class="title">{{ 'coupon.for_specified_classrooms'|trans }}</p>
		{% endif %}
	{% endif %}
	{% if cardDetail.targetType == "vip" %}
		{% if cardDetail.targetId == 0 %}
			<p class="title">{{ 'coupon.for_any_level_of_VIP_membership'|trans }}</p>
		{% else %}
			<p class="title">{{ 'coupon.for_specified_level_of_VIP_membership'|trans }}</p>
		{% endif %}
	{% endif %}
	{% if cardDetail.targetType == "all" or cardDetail.targetType == "fullDiscount" %}
		<p class="title">{{ 'coupon.for_any_purchase_on_our_web_site'|trans }}</p>
	{% endif %}
	<p class="price">
		{% if cardDetail.type == "minus" %}￥{% endif %}
		<strong>{{ cardDetail.rate }}</strong>
		{% if cardDetail.type == "discount" %}{{ 'coupon.discount'|trans }}{% endif %}
		{% if cardDetail.targetType == "course" and cardDetail.targetId != 0 and cardDetail.status != 'using' %}
			{% set courseSet = data('CourseSet', {id : cardDetail.targetId}) %}
			<a href="{{ path('course_show',{ id : courseSet.defaultCourseId }) }}">{{ 'coupon.buy_course_btn'|trans }}
				></a>
		{% elseif cardDetail.targetType == "course" and cardDetail.targetId == 0 and cardDetail.status != 'using' %}
			<a href="{{ path('course_set_explore') }}">{{ 'coupon.buy_course_btn'|trans }}
				></a>
		{% elseif cardDetail.targetType == "vip" %}
			<a href="{{ path('vip') }}">{{ 'coupon.buy_VIP_btn'|trans }}
				></a>
		{% elseif cardDetail.targetType == "classroom" and cardDetail.targetId == 0 and cardDetail.status != 'using' %}
			<a href="{{ path('classroom_explore') }}">{{ 'coupon.buy_classroom_btn'|trans }}
				></a>
		{% elseif cardDetail.targetType == "classroom" and cardDetail.targetId != 0 and cardDetail.status != 'using' %}
			<a href="{{ path('classroom_show',{ id : cardDetail.targetId }) }}">{{ 'coupon.buy_classroom_btn'|trans }}
				></a>
		{% else %}
			<a href="{{ path('course_set_explore') }}">{{ 'coupon.buy_something_btn'|trans }}
				></a>
		{% endif %}
	</p>
	<p>{{ 'coupon.expired_on'|trans }}
		<span>{{ 'coupon.deadline_year'|trans({'%deadline%': cardDetail.deadline|date('Y')}) }}{{ 'coupon.deadline_month'|trans({'%deadline%': cardDetail.deadline|date('n')}) }}{{ 'coupon.deadline_day'|trans({'%deadline%': cardDetail.deadline|date('d')}) }}</span>
	</p>
	{% if cardDetail.targetType == 'fullDiscount' and cardDetail.fullDiscountPrice %}
		<p>
			{{'coupon.Requirements'|trans({'%fullDiscountPrice%': cardDetail.fullDiscountPrice|default('coupon.Accessible'|trans)})}}
		</p>
	{% endif %}
</div>
